import FileSync from 'lowdb/adapters/FileSync.js'
import low from 'lowdb'
import {nanoid} from 'nanoid'

const dataBaseDir = 'E:/code/electron/part-man/data/'

const partDb = low(new FileSync(dataBaseDir + 'parts.json'))

const parts = partDb.value()

for (let part of parts) {
    console.log(part.id)
    part.id = nanoid()
    console.log(part.id)
}
// partDb.write()
